home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Printing.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __PRINTING__
- #define __PRINTING__
-
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- /* #include <Types.h> */
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- #endif
-
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- /* #include <Windows.h> */
- /* #include <Events.h> */
- /* #include <OSUtils.h> */
- /* #include <Controls.h> */
- /* #include <Menus.h> */
- /* #include <TextEdit.h> */
- #endif
-
- enum {
- iPFMaxPgs = 128,
- iPrPgFract = 120, /*Page scale factor. ptPgSize (below) is in units of 1/iPrPgFract*/
- iPrPgFst = 1, /*Page range constants*/
- iPrPgMax = 9999,
- iPrRelease = 3, /*Current version number of the code.*/
- iPrSavPFil = -1,
- iPrAbort = 0x0080,
- iPrDevCtl = 7, /*The PrDevCtl Proc's ctl number*/
- lPrReset = 0x00010000, /*The PrDevCtl Proc's CParam for reset*/
- lPrLineFeed = 0x00030000,
- lPrLFStd = 0x0003FFFF, /*The PrDevCtl Proc's CParam for std paper advance*/
- lPrLFSixth = 0x0003FFFF,
- lPrPageEnd = 0x00020000, /*The PrDevCtl Proc's CParam for end page*/
- lPrDocOpen = 0x00010000,
- lPrPageOpen = 0x00040000,
- lPrPageClose = 0x00020000,
- lPrDocClose = 0x00050000,
- iFMgrCtl = 8, /*The FMgr's Tail-hook Proc's ctl number*/
- iMscCtl = 9, /*The FMgr's Tail-hook Proc's ctl number*/
- iPvtCtl = 10 /*The FMgr's Tail-hook Proc's ctl number*/
- };
-
- #define sPrDrvr ".Print"
-
- enum {
- iMemFullErr = -108,
- iIOAbort = -27,
- pPrGlobals = 0x00000944, /*The PrVars lo mem area:*/
- bDraftLoop = 0,
- bSpoolLoop = 1,
- bUser1Loop = 2,
- bUser2Loop = 3,
- fNewRunBit = 2,
- fHiResOK = 3,
- fWeOpenedRF = 4,
- /*Driver constants */
- iPrBitsCtl = 4,
- lScreenBits = 0,
- lPaintBits = 1,
- lHiScreenBits = 0x00000002, /*The Bitmap Print Proc's Screen Bitmap param*/
- lHiPaintBits = 0x00000003, /*The Bitmap Print Proc's Paint [sq pix] param*/
- iPrIOCtl = 5,
- iPrEvtCtl = 6, /*The PrEvent Proc's ctl number*/
- lPrEvtAll = 0x0002FFFD, /*The PrEvent Proc's CParam for the entire screen*/
- lPrEvtTop = 0x0001FFFD, /*The PrEvent Proc's CParam for the top folder*/
- iPrDrvrRef = -3
- };
-
- enum {
- getRslDataOp = 4,
- setRslOp = 5,
- draftBitsOp = 6,
- noDraftBitsOp = 7,
- getRotnOp = 8,
- NoSuchRsl = 1,
- OpNotImpl = 2, /*the driver doesn't support this opcode*/
- RgType1 = 1
- };
-
- enum {
- feedCut,
- feedFanfold,
- feedMechCut,
- feedOther
- };
-
- typedef unsigned char TFeed;
-
- enum {
- scanTB,
- scanBT,
- scanLR,
- scanRL
- };
-
- typedef unsigned char TScan;
-
-
- /* A Rect Ptr */
-
- typedef Rect *TPRect;
-
- typedef pascal void (*PrIdleProcPtr)(void);
-
- enum {
- uppPrIdleProcInfo = kPascalStackBased
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr PrIdleUPP;
-
- #define CallPrIdleProc(userRoutine) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppPrIdleProcInfo)
- #define NewPrIdleProc(userRoutine) \
- (PrIdleUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPrIdleProcInfo, GetCurrentISA())
- #else
- typedef PrIdleProcPtr PrIdleUPP;
-
- #define CallPrIdleProc(userRoutine) \
- (*(userRoutine))()
- #define NewPrIdleProc(userRoutine) \
- (PrIdleUPP)(userRoutine)
- #endif
-
- typedef pascal void (*PItemProcPtr)(DialogPtr theDialog, short item);
-
- enum {
- uppPItemProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr PItemUPP;
-
- #define CallPItemProc(userRoutine, theDialog, item) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppPItemProcInfo, (theDialog), (item))
- #define NewPItemProc(userRoutine) \
- (PItemUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPItemProcInfo, GetCurrentISA())
- #else
- typedef PItemProcPtr PItemUPP;
-
- #define CallPItemProc(userRoutine, theDialog, item) \
- (*(userRoutine))((theDialog), (item))
- #define NewPItemProc(userRoutine) \
- (PItemUPP)(userRoutine)
- #endif
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrPort {
- GrafPort gPort; /*The Printer's graf port.*/
- QDProcs gProcs; /*..and its procs*/
- long lGParam1; /*16 bytes for private parameter storage.*/
- long lGParam2;
- long lGParam3;
- long lGParam4;
- Boolean fOurPtr; /*Whether the PrPort allocation was done by us.*/
- Boolean fOurBits; /*Whether the BitMap allocation was done by us.*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrPort TPrPort;
-
- typedef TPrPort *TPPrPort;
-
-
- /* Printing Graf Port. All printer imaging, whether spooling, banding, etc, happens "thru" a GrafPort.
- This is the "PrPeek" record. */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrInfo {
- short iDev; /*Font mgr/QuickDraw device code*/
- short iVRes; /*Resolution of device, in device coordinates*/
- short iHRes; /*..note: V before H => compatable with Point.*/
- Rect rPage; /*The page (printable) rectangle in device coordinates.*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrInfo TPrInfo;
-
- typedef TPrInfo *TPPrInfo;
-
-
- /* Print Info Record: The parameters needed for page composition. */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrStl {
- short wDev;
- short iPageV;
- short iPageH;
- char bPort;
- TFeed feed;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrStl TPrStl;
-
- typedef TPrStl *TPPrStl;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrXInfo {
- short iRowBytes;
- short iBandV;
- short iBandH;
- short iDevBytes;
- short iBands;
- char bPatScale;
- char bUlThick;
- char bUlOffset;
- char bUlShadow;
- TScan scan;
- char bXInfoX;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrXInfo TPrXInfo;
-
- typedef TPrXInfo *TPPrXInfo;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrJob {
- short iFstPage; /*Page Range.*/
- short iLstPage;
- short iCopies; /*No. copies.*/
- char bJDocLoop; /*The Doc style: Draft, Spool, .., and ..*/
- Boolean fFromUsr; /*Printing from an User's App (not PrApp) flag*/
- PrIdleUPP pIdleProc; /*The Proc called while waiting on IO etc.*/
- StringPtr pFileName; /*Spool File Name: NIL for default.*/
- short iFileVol; /*Spool File vol, set to 0 initially*/
- char bFileVers; /*Spool File version, set to 0 initially*/
- char bJobX; /*An eXtra byte.*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrJob TPrJob;
-
- typedef TPrJob *TPPrJob;
-
-
- /* Print Job: Print "form" for a single print request. */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrint {
- short iPrVersion; /*(2) Printing software version*/
- TPrInfo prInfo; /*(14) the PrInfo data associated with the current style.*/
- Rect rPaper; /*(8) The paper rectangle [offset from rPage]*/
- TPrStl prStl; /*(8) This print request's style.*/
- TPrInfo prInfoPT; /*(14) Print Time Imaging metrics*/
- TPrXInfo prXInfo; /*(16) Print-time (expanded) Print info record.*/
- TPrJob prJob; /*(20) The Print Job request (82) Total of the above; 120-82 = 38 bytes needed to fill 120*/
- short printX[19]; /*Spare to fill to 120 bytes!*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrint TPrint;
-
- typedef TPrint *TPPrint, **THPrint;
-
-
- /* The universal 120 byte printing record */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrStatus {
- short iTotPages; /*Total pages in Print File.*/
- short iCurPage; /*Current page number*/
- short iTotCopies; /*Total copies requested*/
- short iCurCopy; /*Current copy number*/
- short iTotBands; /*Total bands per page.*/
- short iCurBand; /*Current band number*/
- Boolean fPgDirty; /*True if current page has been written to.*/
- Boolean fImaging; /*Set while in band's DrawPic call.*/
- THPrint hPrint; /*Handle to the active Printer record*/
- TPPrPort pPrPort; /*Ptr to the active PrPort*/
- PicHandle hPic; /*Handle to the active Picture*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrStatus TPrStatus;
-
- typedef TPrStatus *TPPrStatus;
-
-
- /* Print Status: Print information during printing. */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPfPgDir {
- short iPages;
- long iPgPos[129]; /*ARRAY [0..iPfMaxPgs] OF LONGINT*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPfPgDir TPfPgDir;
-
- typedef TPfPgDir *TPPfPgDir, **THPfPgDir;
-
-
- /* PicFile = a TPfHeader followed by n QuickDraw Pics (whose PicSize is invalid!) */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TPrDlg {
- DialogRecord Dlg; /*The Dialog window*/
- ModalFilterUPP pFltrProc; /*The Filter Proc.*/
- PItemUPP pItemProc; /*The Item evaluating proc.*/
- THPrint hPrintUsr; /*The user's print record.*/
- Boolean fDoIt;
- Boolean fDone;
- long lUser1; /*Four longs for user's to hang global data.*/
- long lUser2; /*...Plus more stuff needed by the particular printing dialog.*/
- long lUser3;
- long lUser4;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TPrDlg TPrDlg;
-
- typedef TPrDlg *TPPrDlg;
-
- typedef pascal TPPrDlg (*PDlgInitProcPtr)(THPrint hPrint);
-
- enum {
- uppPDlgInitProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(TPPrDlg)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(THPrint)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr PDlgInitUPP;
-
- #define CallPDlgInitProc(userRoutine, hPrint) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppPDlgInitProcInfo, (hPrint))
- #define NewPDlgInitProc(userRoutine) \
- (PDlgInitUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPDlgInitProcInfo, GetCurrentISA())
- #else
- typedef PDlgInitProcPtr PDlgInitUPP;
-
- #define CallPDlgInitProc(userRoutine, hPrint) \
- (*(userRoutine))((hPrint))
- #define NewPDlgInitProc(userRoutine) \
- (PDlgInitUPP)(userRoutine)
- #endif
-
-
- /* This is the Printing Dialog Record. Only used by folks appending their own dialogs.
- Print Dialog: The Dialog Stream object. */
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TGnlData {
- short iOpCode;
- short iError;
- long lReserved; /*more fields here depending on call*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TGnlData TGnlData;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TRslRg {
- short iMin;
- short iMax;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TRslRg TRslRg;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TRslRec {
- short iXRsl;
- short iYRsl;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TRslRec TRslRec;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TGetRslBlk {
- short iOpCode;
- short iError;
- long lReserved;
- short iRgType;
- TRslRg xRslRg;
- TRslRg yRslRg;
- short iRslRecCnt;
- TRslRec rgRslRec[27];
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TGetRslBlk TGetRslBlk;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TSetRslBlk {
- short iOpCode;
- short iError;
- long lReserved;
- THPrint hPrint;
- short iXRsl;
- short iYRsl;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TSetRslBlk TSetRslBlk;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TDftBitsBlk {
- short iOpCode;
- short iError;
- long lReserved;
- THPrint hPrint;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TDftBitsBlk TDftBitsBlk;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TGetRotnBlk {
- short iOpCode;
- short iError;
- long lReserved;
- THPrint hPrint;
- Boolean fLandscape;
- char bXtra;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TGetRotnBlk TGetRotnBlk;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern pascal void PrPurge(void)
- FOURWORDINLINE(0x2F3C, 0xA800, 0x0000, 0xA8FD);
- extern pascal void PrNoPurge(void)
- FOURWORDINLINE(0x2F3C, 0xB000, 0x0000, 0xA8FD);
- extern pascal void PrOpen(void)
- FOURWORDINLINE(0x2F3C, 0xC800, 0x0000, 0xA8FD);
- extern pascal void PrClose(void)
- FOURWORDINLINE(0x2F3C, 0xD000, 0x0000, 0xA8FD);
- extern pascal void PrintDefault(THPrint hPrint)
- FOURWORDINLINE(0x2F3C, 0x2004, 0x0480, 0xA8FD);
- extern pascal Boolean PrValidate(THPrint hPrint)
- FOURWORDINLINE(0x2F3C, 0x5204, 0x0498, 0xA8FD);
- extern pascal Boolean PrStlDialog(THPrint hPrint)
- FOURWORDINLINE(0x2F3C, 0x2A04, 0x0484, 0xA8FD);
- extern pascal Boolean PrJobDialog(THPrint hPrint)
- FOURWORDINLINE(0x2F3C, 0x3204, 0x0488, 0xA8FD);
- extern pascal TPPrDlg PrStlInit(THPrint hPrint)
- FOURWORDINLINE(0x2F3C, 0x3C04, 0x040C, 0xA8FD);
- extern pascal TPPrDlg PrJobInit(THPrint hPrint)
- FOURWORDINLINE(0x2F3C, 0x4404, 0x0410, 0xA8FD);
- extern pascal void PrJobMerge(THPrint hPrintSrc, THPrint hPrintDst)
- FOURWORDINLINE(0x2F3C, 0x5804, 0x089C, 0xA8FD);
- extern pascal Boolean PrDlgMain(THPrint hPrint, PDlgInitUPP pDlgInit)
- FOURWORDINLINE(0x2F3C, 0x4A04, 0x0894, 0xA8FD);
- extern pascal TPPrPort PrOpenDoc(THPrint hPrint, TPPrPort pPrPort, Ptr pIOBuf)
- FOURWORDINLINE(0x2F3C, 0x0400, 0x0C00, 0xA8FD);
- extern pascal void PrCloseDoc(TPPrPort pPrPort)
- FOURWORDINLINE(0x2F3C, 0x0800, 0x0484, 0xA8FD);
- extern pascal void PrOpenPage(TPPrPort pPrPort, TPRect pPageFrame)
- FOURWORDINLINE(0x2F3C, 0x1000, 0x0808, 0xA8FD);
- extern pascal void PrClosePage(TPPrPort pPrPort)
- FOURWORDINLINE(0x2F3C, 0x1800, 0x040C, 0xA8FD);
- extern pascal void PrPicFile(THPrint hPrint, TPPrPort pPrPort, Ptr pIOBuf, Ptr pDevBuf, TPrStatus *prStatus)
- FOURWORDINLINE(0x2F3C, 0x6005, 0x1480, 0xA8FD);
- extern pascal short PrError(void)
- FOURWORDINLINE(0x2F3C, 0xBA00, 0x0000, 0xA8FD);
- extern pascal void PrSetError(short iErr)
- FOURWORDINLINE(0x2F3C, 0xC000, 0x0200, 0xA8FD);
- extern pascal void PrGeneral(Ptr pData)
- FOURWORDINLINE(0x2F3C, 0x7007, 0x0480, 0xA8FD);
- extern pascal void PrDrvrOpen(void)
- FOURWORDINLINE(0x2F3C, 0x8000, 0x0000, 0xA8FD);
- extern pascal void PrDrvrClose(void)
- FOURWORDINLINE(0x2F3C, 0x8800, 0x0000, 0xA8FD);
- extern pascal void PrCtlCall(short iWhichCtl, long lParam1, long lParam2, long lParam3)
- FOURWORDINLINE(0x2F3C, 0xA000, 0x0E00, 0xA8FD);
- extern pascal Handle PrDrvrDCE(void)
- FOURWORDINLINE(0x2F3C, 0x9400, 0x0000, 0xA8FD);
- extern pascal short PrDrvrVers(void)
- FOURWORDINLINE(0x2F3C, 0x9A00, 0x0000, 0xA8FD);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-